package com.travel.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Result<T> {
    private T data;
    private String message;
    private int code;
    private List<Map<String, Object>> list;

    public Result(String message, int code, List<Map<String, Object>> list) {
        this.message = message;
        this.code = code;
        this.list = list;
    }

    public Result(String message, int code) {
        this.message = message;
        this.code = code;
    }

    public Result(T data, String message, int code) {
        this.data = data;
        this.message = message;
        this.code = code;
    }
}
